<?php namespace nimo\domains\acc\models;

use nimo\common\models\BaseModel;

class Book extends BaseModel {

    protected $table = 'acc_book';

	protected $primaryKey = array('domain', 'ym', 'id', 'seq');

    protected $guarded = array();

    public static $rules = array(
        'domain' => 'required|integer',
        'ym' => 'required|max:6',
        'id' => 'required|integer',
        'history' => 'integer',
        'seq' => 'required|integer',
        'type' => 'required|integer',
        'deal' => 'required|integer',
        'approved' => 'integer',
        'checked' => 'integer',
        'ymd' => 'required|integer',
        'd_code' => 'integer',
        'd_name' => 'max:40',
        'd_code2' => 'integer',
        'd_name2' => 'max:40',
        'd_section' => 'integer',
        'd_section_name' => 'max:40',
        'd_amount' => 'integer',
        'd_amount_tax' => 'integer',
        'd_tax_calc_kbn' => 'max:1',
        'd_tax_kbn' => 'max:1',
        'd_tax_pct' => 'integer',
        'd_tax_pct_kbn' => 'integer',
        'c_code' => 'integer',
        'c_name' => 'max:40',
        'c_code2' => 'integer',
        'c_name2' => 'max:40',
        'c_section' => 'integer',
        'c_section_name' => 'max:40',
        'c_amount' => 'integer',
        'c_amount_tax' => 'integer',
        'c_tax_calc_kbn' => 'max:1',
        'c_tax_kbn' => 'max:1',
        'c_tax_pct' => 'integer',
        'c_tax_pct_kbn' => 'integer',
        'summary' => 'max:40',
        'tag' => 'max:1',
        'batch' => 'max:40',
        'create_user' => 'required|max:40',
        'update_user' => 'required|max:40',
    );

    public $incrementing = false;

}
